package com.chennan.book.domain.repository;

import java.util.List;

import com.chennan.book.domain.model.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


public interface BookMapper {
	void insertBook(Book book);
    @Select({
            "<script>",
            "SELECT * FROM F_InvoiceApplication where invoiceApplicationNo = #{no}",
            "</script>"
    })
    FInvoiceApplication queryInvoiceByInvoiceApplicationNo(@Param("no") String no);

    @Update({
            "<script>",
            "update F_InvoiceApplication set customerName='13123132' where invoiceApplicationNo = #{no}",
            "</script>"
    })
    Integer updateInvoiceByInvoiceApplicationNo(@Param("no") String no);

	List<Book> queryAllBook();

    Integer updateBook(Book bookModel);

    Integer updateBooks(@Param("books") List<Book> books);

    Integer updateOrder(@Param("version") Integer version);

    List<Integer> queryOrderVersion(@Param("ids") List<Long> ids);

    Integer batchSaveBooks(@Param("books") List<Book> books);

    Integer batchSaveAccountReceiveableItem(@Param("accountReceiveableItemList") List<AccountReceiveableItem> accountReceiveableItemList);

    Integer batchSaveSupplierInvoiceReceivableBill(@Param("list") List<SupplierInvoiceReceivableBill> list);

    FaDataMapping queryFADATAMAPPING(@Param("code") String code);

    List<FaDataMapping> queryFADATAMAPPINGs();
}
